//
//  StrategyNearbyParser.m
//  ITrip
//
//  Created by dllo on 15/5/25.
//  Copyright (c) 2015年 lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "StrategyNearbyParser.h"

@implementation StrategyNearbyParser

+ (NSMutableArray *)getNearbyParser:(NSData *)data
{
    NSMutableArray *arrayData = [NSMutableArray array];
    NSArray *array = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:nil];
    for (NSDictionary *dic in array) {
        StrategyNearbyModel *model = [StrategyNearbyModel getNearbyModel];
        model.nameNearby = [dic objectForKey:@"name"];
        model.distanceNearby = [[dic objectForKey:@"distance"]integerValue];
        model.image_url_Nearby = [dic objectForKey:@"image_url"];
        model.IDNearby = [[dic objectForKey:@"id"]integerValue];
        [arrayData addObject:model];
    }
    return arrayData; 
}


@end
